var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
function addAge6(value) {
    /* 接收参数后 返回真正的装饰器函数 */
    return function xx(target) {
        target.prototype.age = value;
    };
}
function a(target, //PersonIII 的原型
propertyKey, //sayHello
descriptor // PersonIII.prototype.sayHello 的描述符
) {
    console.log("a called");
}
function b(target, //PersonIII 的原型
propertyKey, //sayHello
descriptor // PersonIII.prototype.sayHello 的描述符
) {
    console.log("b called");
}
function c() {
    console.log("c called");
    /* 接收参数后 返回真正的装饰器函数 */
    return function innerc(target, //PersonIII 的原型
    propertyKey, //sayHello
    descriptor // PersonIII.prototype.sayHello 的描述符
    ) {
        console.log("innerc called");
    };
}
function d() {
    console.log("d called");
    /* 接收参数后 返回真正的装饰器函数 */
    return function innerd(target, //PersonIII 的原型
    propertyKey, //sayHello
    descriptor // PersonIII.prototype.sayHello 的描述符
    ) {
        console.log("innerd called");
    };
}
var PersonVI = /** @class */ (function () {
    function PersonVI(name) {
        this.name = name;
    }
    /* b => a */
    // @a
    // @b
    PersonVI.prototype.sayHello = function (who) {
        console.log("hello", who);
    };
    /* c - d - innderd - innerc */
    PersonVI.prototype.sayHi = function (who) {
        console.log("hi", who);
    };
    __decorate([
        c(),
        a,
        d(),
        b
    ], PersonVI.prototype, "sayHi", null);
    PersonVI = __decorate([
        addAge6(80)
    ], PersonVI);
    return PersonVI;
}());
var p60 = new PersonVI("yellow");
console.log(p60.age);
